package com.hmall.search.service;

import com.hmall.common.vo.PageVO;
import com.hmall.search.dto.SearchPageQueryDTO;
import com.hmall.search.pojo.ItemDoc;

import java.util.List;
import java.util.Map;

public interface SearchService {
    /**
     * 页面查询
     *
     * @param searchPageQueryDTO 搜索页面查询 DTO
     * @return {@link PageVO}<{@link ItemDoc}>
     */
    PageVO<ItemDoc> pageQuery(SearchPageQueryDTO searchPageQueryDTO);

    /**
     * 建议
     *
     * @param key 钥匙
     * @return {@link List}<{@link String}>
     */
    List<String> suggestion(String key);

    /**
     * 过滤 器
     *
     * @return {@link Map}<{@link String}, {@link List}<{@link String}>>
     */
    Map<String, List<String>> filters(SearchPageQueryDTO searchPageQueryDTO);
}
